import request from './request.js';
let service = request.service;
let download = request.download;
export default {
/**新增修改工作计划*/
    insertUpdateWorkPlan(type,data){
        return service({
            url: `/adscm/operation/taskWorkPlan/${type}`,
            method: 'post',
            data
        })
    },
    /**获取个人工作计划列表*/
    getWorkPlanList(data) {
        return service({
            url: `/adscm/operation/taskWorkPlan/select`,
            method: 'post',
            data
        })
    },
     /**获取工作计划列表*/
    getAllWorkPlanList(data) {
        return service({
            url: `/adscm/operation/taskWorkPlan/selectApprove`,
            method: 'post',
            data
        })
    },
    /**删除工作计划列表*/
    deleteWorkPlan(id) {
        return service({
            url: `/adscm/operation/taskWorkPlan/delete/${id}`,
            method: 'get',
        })
    },
    /**新增修改工作明细*/
    insertUpdatePlanDetail(type, data) {
        return service({
            url: `/adscm/operation/taskWorkPlanDetailDetail/${type}`,
            method: 'post',
            data
        })
    },
    /**获取工作明细列表*/
    getPlanDetailList(id) {
        return service({
            url: `/adscm/operation/taskWorkPlanDetailDetail/selectByPid/${id}`,
            method: 'get'
        })
    },
    /**删除工作计划列表*/
    deletePlanDetail(id) {
        return service({
            url: `/adscm/operation/taskWorkPlanDetailDetail/delete/${id}`,
            method: 'get',
        })
    },
    /* /adscm/operation/taskWorkPlanCc/insert */
    taskWorkPlanCcInsert(id,data) {
        return service({
            url: `/adscm/operation/taskWorkPlanCc/insert/${id}`,
            method: 'post',
            data
        })
    },
    /*select/{tid}  */
    taskWorkPlanCcSelect(id) {
        return service({
            url: `/adscm/operation/taskWorkPlanCc/select/${id}`,
            method: 'get',
        })
    },
    /* selectCc */
    selectCc(data) {
        return service({
            url: `/adscm/operation/taskWorkPlan/selectCc`,
            method: 'post',
            data
        })
    },
    // 获取附件上传列表
    attachmentUploadList(pid) {
       return service({
           url: `/adscm/operation/taskWorkAttachment/selectByPid/${pid}`,
           method: 'post'
       })
    },
    //新增附件上传
    insertAttachmentUpload(data){
        return service({
            url: `/adscm/operation/taskWorkAttachment/insert`,
            method: 'post',
            data
        })
    },
    // 上传附件上传
    deleteAttachmentUpload(id){
        return service({
            url: `/adscm/operation/taskWorkAttachment/delete/${id}`,
            method: 'post'
        })
    }

}
